﻿//-----------------------------------------------------------------------
// <copyright file="MLExecutionResults.cs" company="MAPILab Ltd">
//     Copyright (c) MAPILab Ltd.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace MAPILab.SharePoint.Explorer.Utilities.ScriptRunner
{
    using System.Collections.Specialized;

    /// <summary>
    /// Class that contains the results of execution
    /// </summary>
    internal class MLExecutionResults
    {
        #region Fields

        /// <summary>
        /// MLBrowser object
        /// </summary>
        protected MLBrowser returnedObjects = null;

        /// <summary>
        /// Errors collection
        /// </summary>
        protected StringCollection errorsCollection = new StringCollection();

        /// <summary>
        /// Warnings collection
        /// </summary>
        protected StringCollection warningsCollection = new StringCollection();

        #endregion

        #region Members

        /// <summary>
        /// Gets MLBrowser object
        /// </summary>
        public MLBrowser ReturnedObjects
        {
            get { return this.returnedObjects; }
        }

        /// <summary>
        /// Gets errors collection
        /// </summary>
        public StringCollection ErrorsCollection
        {
            get { return this.errorsCollection; }
        }

        /// <summary>
        /// Gets warnings collections
        /// </summary>
        public StringCollection WarningsCollection
        {
            get { return this.warningsCollection; }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="returnedObjects">MLBrowser object</param>
        /// <param name="errorsCollection">Errors collection</param>
        /// <param name="warningsCollection">Warnings collectins</param>
        public MLExecutionResults(MLBrowser returnedObjects, StringCollection errorsCollection, StringCollection warningsCollection)
        {
            this.returnedObjects = returnedObjects;
            this.errorsCollection = errorsCollection;
            this.warningsCollection = warningsCollection;
        }

        #endregion
    }
}
